<!DOCTYPE HTML>
<html lang="en">
<head>
  <meta charset='UTF-8' />
<meta name='generator' content='ecos.b2c' />
<title>三鑫-灯世界网销平台</title>
<meta name='keywords' content='' />
<meta name='description' content='' />
<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'/>
<link href="__PUBLIC__/phone/css/zhuce_style.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/phone/css/tui.css"/>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
	<script src="__PUBLIC__/layer/layer.js"></script>
	<script src="__PUBLIC__/hytn/js/jquery.form.min.js" type="text/javascript"></script>
	<script src="__PUBLIC__/shop.js"></script>
</head>
<body style="background-color: #F7F7F8;">
<header style="background-image: linear-gradient(#00a1f2,#00a1f2);">
  <div class="a-bar">
    <a href="javascript:history.back()" class="a-back"><i class="arr left"></i></a>
    <div class="a-name" style="color: white">退换货</div>
  </div>
</header>
<div class="header1">
	<div><img src="__ROOT__{$info.good_picture}" alt="" /></div>
	<div>
		<p>{$info.good_name}</p>
	</div>
</div>
<form action="{:U('tuihuo')}" class="ajax-form" method="post" enctype="multipart/form-data">
	<input type="hidden" name="order_id" value="{$info.order_id}">
	<div class="header3">
		<p><span>退换原因：</span><input type="text" name="return_reason" required/></p>
	</div>
	<div class="header4">
		<div class="form1">
			<img src="" alt="" class="blah" style="width:80px;height:80px;float:left;margin-right:10px;display: none;"/>
			<div class="blahasd">
				<input type='file' name="front" class="imgInp" style="width: 80px;height: 80px;opacity: 0;" required/>
				<p style="position: absolute;bottom: 10px;color:#bfbfbf;">上传正面图片</p>
			</div>
		</div>

		<div class="form1">
			<img src="" alt="" class="blah" style="width:80px;height:80px;float:left;margin-right:10px;display: none;"/>
			<div class="blahasd">
				<input type='file' name="reverse" class="imgInp" style="width: 80px;height: 80px;opacity: 0;" required/>
				<p style="position: absolute;bottom: 10px;color:#bfbfbf;">上传反面图片</p>
			</div>
		</div>
		<div style="clear: both;"></div>
		<div class="form1">
			<img src="" alt="" class="blah" style="width:80px;height:80px;float:left;margin-right:10px;display: none;"/>
			<div class="blahasd">
				<input type='file' name="left" class="imgInp" style="width: 80px;height: 80px;opacity: 0;" required/>
				<p style="position: absolute;bottom: 10px;color:#bfbfbf;">上传左面图片</p>
			</div>
		</div>

		<div class="form1">
			<img src="" alt="" class="blah" style="width:80px;height:80px;float:left;margin-right:10px;display: none;"/>
			<div class="blahasd">
				<input type='file' name="right" class="imgInp" style="width: 80px;height: 80px;opacity: 0;" required/>
				<p style="position: absolute;bottom: 10px;color:#bfbfbf;">上传右面图片</p>
			</div>
		</div>
		<div style="clear: both;"></div>
	</div>
	<div style="text-align: center">
		<button type="submit" class="header5">申请退换货</button>
	</div>
</form>
<script>
	function readURL(input,$this) {

   if (input.files && input.files[0]) {

       var reader = new FileReader();

       reader.onload = function (e) {
//			$('#form1').prepend($('<img id="blah" src='+e.target.result+' style="width:100px;height:100px;float:left;margin-right:10px"/>'))
           $this.parent().prev().attr('src', e.target.result).show();
           $this.parent().hide()
       }
       reader.readAsDataURL(input.files[0]);

   }
}

$(".imgInp").change(function(){

   readURL(this,$(this));

});
$('.blah').click(function(){
	$(this).next().find('input').val(""); 
	$(this).hide()
	$(this).next().show()
})
</script>
</body>
</html>
